@import 'base.scss';

//* z-index *

.sidebar-wrapper{
  z-index: 103;
}
.list-wrapper{
  z-index: 101;
}
.workspace-wrapper,
.workspace-wrapper .slide{
  z-index: 100;
}
.photos-thumb .photo-box {
  .photo {
    z-index: 111;
  }
  .remove_photo_btn{
    z-index: 112;
  }
}

.theme-blue {
  .sidebar-wrapper {
    background-color: $theme-bule;
  }
  .btn-bg-theme{
    background-color: $theme-bule;
    border-color: $theme-bule;
  }
  .sidebar-wrapper .sidebar-nav .sidebar-item.active .sidebar-link{
    .icon i, p {
      color: $theme-bule;
    }
  }
}
.theme-green {
  .sidebar-wrapper {
    background-color: $theme-green;
  }
  .btn-bg-theme{
    background-color: $theme-green;
    border-color: $theme-green;
  }
  .sidebar-wrapper .sidebar-nav .sidebar-item.active .sidebar-link{
    .icon i, p {
      color: $theme-green;
    }
  }
}
.theme-red {
  .sidebar-wrapper {
    background-color: $theme-red;
  }
  .btn-bg-theme{
    background-color: $theme-red;
    border-color: $theme-red;
  }
  .sidebar-wrapper .sidebar-nav .sidebar-item.active .sidebar-link{
    .icon i, p {
      color: $theme-red;
    }
  }
}

.w500-btn{
  font-size: 18px;
  margin-top: 20px;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.page-container {
  display: flex;
  flex-direction: row;
}
.sidebar-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 85px;
  height: 100vh;
  max-height: 100%;
  .sidebar-nav {
    margin: 0;
    padding: 0;
    list-style: none;
    .sidebar-item {
      .placeholder-block{
        height: 88px;
      }
      &.avatar-item {
        padding: 18px 16px;
        //margin-bottom: 20px;
        .avatar {
          cursor: pointer;
          width: 48px;
          height: 48px;
          background-color: white;
          background-position: center;
          background-repeat: no-repeat;
          background-size: cover;
          border-radius: 4px;
          margin: 0 auto;
        }
      }
      &.sidebar-item-notice {

      }
      &.sidebar-item-menu {
        .icon-menu {
          font-size: 20px !important;
        }
      }
      &.active {
        .sidebar-link {
          background-color: white;
          p,
          .icon i {
          }
        }
      }
      .sidebar-link {
        display: block;
        text-decoration: none;
        text-align: center;
        padding: 20px 10px;
        *{
          pointer-events: none;
        }
        p {
          margin: 0;
          line-height: 1;
          color: white;
          font-size: 12px;
          padding-top: 4px;
        }
        .icon {
          display: block;
          position: relative;
          i {
            color: white;
            font-size: 28px;
          }
        }
      }
      .count-badge {
        top: -8px;
        right: 2px;
      }
      &.sidebar-item-notice,
      &.sidebar-item-menu {
        .badge-notice {
          top: -8px;
          right: 10px;
        }
      }
    }
  }
}

.list-wrapper {
  position: absolute;
  top: 0;
  left: 85px;
  width: 330px;
  max-height: 100vh;
  height: 100%;
  border-left: 1px #c5c5c6 solid;
  border-right: 1px #c5c5c6 solid;
  box-sizing: content-box;
  transform: translate3d(0, 0, 0);
  transition: transform .3s;
  &.expansion{
    transform: translate3d(-332px, 0, 0);
  }
  .list-header{
    .list-wrapper-expansion-btn{
      cursor: pointer;
      width: 52px;
      float: left;
      .icon-back{
      }
      span{
      }
    }
    .title{
      font-size: 20px;
    }
  }
  .list-panel {
    width: 330px;
    .list-scroll {
      //height: calc(100vh - 92px);
      height: 100vh;
      overflow-y: auto;
      position: relative;
      background-color: #efefef;
      &.list-scroll-long {
        height: calc(100vh - 50px - 40px) !important;
      }
      .list-item {
        width: 100%;
        background-color: white;
        border-bottom: 1px $darkgray solid;
        padding: 10px;
        &.active {
          background-color: $darkgray;
        }
        .task-item-head {
          pointer-events: none;
          p {
            padding: 0;
            margin: 0;
          }
        }
      }
    }
    .list-wrapper-header {
      background-color: #efefef;
      border-bottom: 1px #c5c5c6 solid;
      .search-panel {
        padding: 14px 8px;
        background-color: #efefef;
        .search-form {
          background-color: #d5d5d5;
          //border: 1px #7c6d40 solid;
          border-radius: 4px;
          padding: 6px 10px;
          .icon-search {
            font-size: 14px;
          }
          input {
            border: none;
            color: black;
            background-color: transparent;
            width: calc(100% - 14px);
            font-size: 14px;
            outline: none;
            vertical-align: baseline;
          }
        }
      }
    }
  }
}

.list-wrapper .list-header,
.workspace-wrapper .workspace-header {
  height: 50px;
  padding: 10px;
  border-top: 1px #c5c5c6 solid;
  border-bottom: 1px #c5c5c6 solid;
  box-sizing: border-box;
  background-color: white;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.collapse-btn {
  color: $dark;
  outline: none;
  width: 44px;
  height: 44px;
  padding: 15px 2px;
  background-color: transparent;
  text-align: center;
  &:after {
    display: inline-block;
    width: 0;
    height: 0;
    content: "";
    border-top: .8em solid;
    border-right: .6em solid transparent;
    border-bottom: 0;
    border-left: .6em solid transparent;
  }
}

.workspace-wrapper{
  width: calc(100vw - 332px - 85px);
  max-height: 100vh;
  height: 100vh;
  left: 417px;
  position: relative;
  transition: width .3s, transform .3s;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  &.expansion{
    width: calc(100vw - 85px);
    transform: translate3d(-332px, 0, 0);
  }
  &.showmodal{
    z-index: auto !important;
  }
  .workspace-header{
    height: 50px;
    border-bottom: 1px #c5c5c6 solid;
    background-color: white;
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    .workspace-wrapper-expansion {
      //width: 82px;
      cursor: pointer;
      flex-shrink: 0;
      .workspace-wrapper-expansion-btn {
        cursor: pointer;
        pointer-events: none;
        //opacity: 0;
        display: none;
        &:before{
          content: ' ';
          display: block;
          width: 82px;
        }
        &.show{
          display: inline-block;
          pointer-events: auto;
          //opacity: 1;
          &:before {
            content: '';
            display: none;
          }
        }
        .icon-back {
          position: relative;
          top: 2px;
          padding-right: 6px;
          color: $theme-bule;
          font-size: 20px;
          display: inline-block;
        }
        span {
          color: $theme-bule;
          font-size: 18px;
        }
      }
      .workspace-wrapper-back-btn{
        display: inline-block;
      }
      &:last-child{
        text-align: right;
      }
    }
    .workspace-wrapper-expansion-placeholder {
      width: 0;
      &.show {
        width: 82px;
      }
    }
    .title{
      font-size: 20px;
      //width: calc(100% - 80px);
      text-align: center;
      left: 82px;
      float: left;
      overflow-x: auto;
      overflow-y: hidden;
      white-space: nowrap;
      margin: 0 10px;
    }
  }
  .workspace-panel{
    height: calc(100vh - 50px);
    overflow-y: auto;
    padding: 10px;
    background-color: #efefef;
    position: relative;
    .loading{
      height: calc(100vh - 50px);
    }
    .workspace-panel-header {
      padding-top: 10px;
      padding-bottom: 0;
      .item-avatar {
        position: relative;
        overflow: hidden;
        width: 80px;
        height: 80px;
        background-size: 80px 80px;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 4px;
      }
      .agency-name{
        border-bottom: 1px #c5c5c5 solid;
        margin-left: 20px;
        padding-bottom: 10px;
        flex-grow: 0;
        .title{
          font-size: 20px;
          line-height: 1.2;
          word-break: break-word;
          //max-width: 48px;
          //min-width: 48px;
          margin: 0 auto;
          text-align: center;
        }
        .status{
          font-size: 18px;
        }
      }
    }
  }
}

.workspace-header,
.task-list-header {
  .header-placeholder {
    width: 52px;
  }
  &.expansion .header-placeholder {
    width: 82px;
  }
}

.sign_panel{
  position: absolute;
  width: calc(100vw - 85px);
  top: 50px;
  left: 85px;
  z-index: 102;
  overflow: hidden;
  canvas{
    position: relative;
    top: -50px;
    left: -85px;
  }
}

#project-switch-modal{
  .modal-body{
    padding: 0;
  }
  .cell-body {
    border-radius: 0;
    .project-switch-btn {
      border-bottom-width: 0;
      justify-content: start;
      cursor: pointer;
      &.active{
        background-color: #d5d5d5;
      }
      * {
        pointer-events: none;
      }
      .title {
        .logo {
          width: 48px;
          height: 48px;
          background-repeat: no-repeat;
          background-position: center;
          background-size: contain;
          margin: 6px 0;
          background-color: white;
          border-radius: 6px;
        }
      }
      .value {
        border-bottom: 1px #d5d5d5 solid;
        font-size: 18px;
        padding: 16px 0;
        margin-left: 20px;
        width: 100%;
      }
    }
  }
}

.col-xl-2_4,
.col-lg-2_4,
.col-md-2_4,
.col-sm-2_4 {
  position: relative;
  width: 100%;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

.f-column{
  flex-direction: column;
}
.f-row{
  flex-direction: row;
}
@media (min-width: 0px) {
  .col-xs-0{
    display: none;
  }
  .col-xs{
    display: block !important;
  }
  .col-xs-2_4 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }
  .f-column-xs{
    flex-direction: column;
  }
  .f-row-xs{
    flex-direction: row;
  }
}
@media (max-width: 575px) {
  .hide-xs{
    display: none;
  }
}
@media (min-width: 576px) {
  .col-sm-0{
    display: none;
  }
  .col-sm{
    display: block !important;
  }
  .col-sm-2_4 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }
  .f-column-sm{
    flex-direction: column;
  }
  .f-row-sm{
    flex-direction: row;
  }
}
@media (max-width: 767px) {
  .hide-sm{
    display: none;
  }
}
@media (min-width: 768px) {
  .col-md-0{
    display: none;
  }
  .col-md{
    display: block !important;
  }
  .col-md-2_4 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }
  .f-column-md{
    flex-direction: column;
  }
  .f-row-md{
    flex-direction: row;
  }
}
@media (max-width: 991px) {
  .hide-md{
    display: none;
  }
}
@media (min-width: 992px){
  .col-lg-0{
    display: none;
  }
  .col-lg{
    display: block !important;
  }
  .col-lg-2_4 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }
  .f-column-lg{
    flex-direction: column;
  }
  .f-row-lg{
    flex-direction: row;
  }
}
@media (min-width: 1200px) {
  .col-xl-0 {
    display: none;
  }
  .col-xl{
    display: block !important;
  }
  .col-xl-2_4 {
    -ms-flex: 0 0 20%;
    flex: 0 0 20%;
    max-width: 20%;
  }
}
.col-0{
  display: none !important;
}
.color-theme-2 {
  .sidebar-wrapper {
    background-color: $theme-green;
    .sidebar-item {
      &.active {
        .sidebar-link {
          color: $theme-green;
          p,
          .icon i {
            color: $theme-green;
          }
        }
      }
    }
  }
  .workspace-header {
    .workspace-wrapper-expansion-btn {
      .icon-back,
      span {
        color: $theme-green;
      }
    }
  }
}

.portrait-info {
  display: none;
  z-index: 1910;
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: center;
  .info {
    width: 200px;
    background: white;
    border-radius: 6px;
    z-index: 1911;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    &:before{
      content: ' ';
      display: block;
      width: 68px;
      height: 40px;
      background-image: url("../assets/base/turn-device.png");
      background-repeat: no-repeat;
      background-position: center;
      margin: 0 auto 20px auto;
    }
  }
  &:after {
    content: ' ';
    display: block;
    background: rgba(13, 17, 18, 0.78);
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
  }
}

@media screen and (max-width: 420px) and (max-height: 812px) and (orientation: portrait){
  .portrait-info {
    display: flex;
  }
}

@media screen and (max-width: 420px) and (max-height: 812px) and (orientation: portrait), screen and (max-width: 812px) and (max-height: 420px) and (orientation: landscape){

  .w100-btn,
  .w500-btn {
    font-size: 16px;
  }
  .sidebar-wrapper{
    width: 60px;
    .sidebar-nav .sidebar-item {
      &.avatar-item{
        padding: 10px 6px;
      }
      .placeholder-block{
        height: 40px;
      }
      .sidebar-link {
        padding: 10px 6px;
      }
    }
  }
  .header-back-btn span {
    font-size: 16px;
  }
  .list-wrapper {
    left: 60px;
    width: 250px;
    .list-header .title {
      font-size: 18px;
    }
    .list-panel {
      width: 250px;
      .list-scroll {
        .list-item {
          padding: 0px 8px;
          .task-item-head {
            padding: 10px 0;
          }
        }
      }
    }
  }
  .workspace-wrapper{
    width: calc(100vw - 310px);
    left: 310px;
    &.expansion {
      width: calc(100vw - 60px);
      transform: translate3d(-250px, 0, 0);
    }
    .workspace-header .title {
      font-size: 18px;
    }
  }
}

@import 'pages.scss';